using System;

namespace ChessKit.ChessLogics
{
  internal enum SlideMoveValidation
  {
    Valid = ValidationError.None,
    PieceDoesntMoveThisWay = ValidationError.PieceDoesntMoveThisWay,
    JumpRequired = ValidationError.PieceDoesntMoveThisWay,
  }
  [Flags]
  internal enum PawnMoveValidation
  {
    DoesntMoveThisWay = ValidationError.PieceDoesntMoveThisWay,
    OnlyTakesThisWay = ValidationError.PieceDoesntMoveThisWay,
    DoesntTakeThisWay = ValidationError.PieceDoesntMoveThisWay,
    JumpRequired = ValidationError.PieceDoesntMoveThisWay,

    Valid = MoveHint.PawnMove,

    Move       = Valid | MoveHint.PawnMove,
    Take       = Valid | MoveHint.PawnMove | MoveHint.Take,
    DoubleMove = Valid | MoveHint.PawnMove | MoveHint.PawnDoubleMove,
    EnPassant  = Valid | MoveHint.PawnMove | MoveHint.Take | MoveHint.EnPassant,
    Promotion  = Valid | MoveHint.PawnMove | MoveHint.Promotion,
    
    PromotionWithTake = Promotion | MoveHint.Take,
  }
  [Flags]
  internal enum KingMoveValidation
  {
    Move = MoveHint.KingMove,

    WhiteKingCastling = CastlingAvailability.WhiteKing,
    BlackKingCastling = CastlingAvailability.BlackKing,
    WhiteQueenCastling = CastlingAvailability.WhiteQueen, 
    BlackQueenCastling = CastlingAvailability.BlackQueen,

    Castling = WhiteKingCastling | BlackKingCastling | WhiteQueenCastling | BlackQueenCastling,
    
    Invalid = 0x10,

    DoesntMoveThisWay = ValidationError.PieceDoesntMoveThisWay,
    CantCastleUnderAttack = ValidationError.CantCastleUnderAttack,
    CantCastleThroughCellUnderAttack = ValidationError.KingUnderAttack,
    CantMoveToCellUnderAttack = ValidationError.KingUnderAttack,
  }
}